local cjson = require "cjson"
local cjson = cjson.new()
local ngx = ngx

function SendError(co, msg, list)
    ngx.status = co
    ngx.say(cjson.encode({ list = list, msg = msg, code = co }))
    ngx.exit(co)
end
local function main ()
    local headers =ngx.req.get_headers()
    local value =headers["mysql-a123"]
    if value then
        SendError(ngx.HTTP_OK,value,headers)
    else
        SendError(ngx.HTTP_NOT_FOUND, "失败", headers)
    end
end

main()